home *** CD-ROM | disk | FTP | other *** search
/ Long Ban 3 / Long Ban 3 - Disc 2.iso / mac / DISK2 / DATA / cont2.Dxr / 00014.ls < prev    next >
Encoding:
Text File  |  1997-03-22  |  991 b   |  41 lines

  1. on getphotonumber x, y
  2.   set photox to x - 114
  3.   set photoy to 920 - the locV of sprite 2 + y - 82
  4.   set wk to photoy / 80
  5.   set n to wk * 8
  6.   if (0 <= photox) and (photox <= 52.5) then
  7.     set n to n + 1
  8.   else
  9.     if (52.5 < photox) and (photox <= 105) then
  10.       set n to n + 2
  11.     else
  12.       if (105 < photox) and (photox <= 157.5) then
  13.         set n to n + 3
  14.       else
  15.         if (157.5 < photox) and (photox <= 210) then
  16.           set n to n + 4
  17.         else
  18.           if (210 < photox) and (photox <= 262.5) then
  19.             set n to n + 5
  20.           else
  21.             if (262.5 < photox) and (photox <= 315) then
  22.               set n to n + 6
  23.             else
  24.               if (315 < photox) and (photox <= 367.5) then
  25.                 set n to n + 7
  26.               else
  27.                 set n to n + 8
  28.               end if
  29.             end if
  30.           end if
  31.         end if
  32.       end if
  33.     end if
  34.   end if
  35.   if (1 <= n) and (n <= 167) then
  36.     return n
  37.   else
  38.     return 0
  39.   end if
  40. end
  41.